package com.github.common.extend.demo.config.transaction.distributed.message.adaptive;

import com.github.common.extend.demo.config.transaction.TransactionSubmitEventListener;
import com.github.common.extend.demo.config.transaction.distributed.message.*;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author X1993
 * @date 2023/2/2
 * @description
 */
@Component
public class RocketMessageManager extends MessageManagerImpl<RocketMessageDTO> implements MessageManager<RocketMessageDTO>{

    public RocketMessageManager(RocketXMessageStorage messageStorage,
                                RocketXMessageSender messageSender,
                                MessageManagerProperties messageManagerProperties,
                                TransactionSubmitEventListener transactionListener) {
        super(messageStorage, messageSender, messageManagerProperties, transactionListener);
    }

    @Scheduled(fixedRate = 5L * 1000)
    public void exceptionHandler(){
        super.makeUpHandler();
    }


}
